﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace UserDemo.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {

            //
            //Request.Form; POST 表单数据
            //Request.QueryString; URL 数据

            //Request.Params

            
            if (Request.Cookies["A"] != null)
            {
                ViewBag.CookieA = Request.Cookies["A"].Value;
                Response.Cookies["A"].Value = Request.Cookies["A"].Value.ToString() + "1";
            }
            else
            {
                Response.Cookies.Add(new HttpCookie("A", "abc"));
            }


            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}